<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #box1 {
        background-color: blue;
        width: 200px;
        height: 200px;
        border: 5px solid red;
        padding: 10px;
        margin: 10px;
      }
      #box2 {
        background-color: pink;
        width: 200px;
        height: 200px;
      }
      #box3 {
        background-color: blue;
        width: 200px;
        height: 200px;
        border: 5px solid red;
        padding: 10px;
        margin: 10px;
        box-sizing: border-box;
      }
      #box4 {
        background-color: greenyellow;
        width: 50px;
        height: 50px;
      }
    </style>
  </head>
  <body>
    <!-- 盒子模型包括：内容、内边距、边框、外边距 -->
    <!-- 默认 宽度100% 高度由内容撑开 -->
    <div id="box1"><div></div></div>
    <div id="box2">内容</div>
    <div id="box3">内容</div>
  </body>
</html>
